<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* 块元素通过  display:inline; 转换为行元素 */
        div {
            width: 200px;
            height: 200px;
            background-color: red;
            display:inline;
        }
        /* 行元素通过 display:block; 转换为块元素*/

        a {
            width: 200px;
            height: 200px;
            background-color: yellow;
            display: block;
            text-decoration: none;
           
        }


    </style>
</head>
<body>
    
<div>
    我是一个块元素
</div>

<a href="#">我是一个行元素</a>
</body>
</html>